package com.tiancheng.trade.commom.web.config;

import com.dtflys.forest.Forest;
import com.dtflys.forest.config.ForestConfiguration;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: likailun
 * @Description:
 * @Date: create in 2024/9/13 15:57
 */
@Getter
@Setter
public class PlatformRequestConfig {
	/**
	 * 服务器地址
	 */
	private String serverPath;
	/**
	 * 腾云网关地址
	 */
	private String gatewayServerPath;
	/**
	 * 认证系统api访问前缀
	 */
	private String authServiceApiPrefix = "";
	/**
	 * 应用id
	 */
	private String clientId;
	/**
	 * 应用key
	 */
	private String clientSecret;
	/**
	 * 根域名,用于单点登录
	 */
	private String rootDomain = "xxxx.com";
	/**
	 * 腾讯云网关clientId
	 */
	private String apiClientId = "AKIDIdHjK9sho5iy7kldlha8mEOHdh8601dO4F9B";
	/**
	 * 腾讯云网关clientSecret
	 */
	private String apiClientSecret = "kjkYZzel5gKddTl5oad7js5cV0xdqyht7zppwknx";
	/**
	 * 默认配置
	 */
	private ForestConfiguration configuration;
	/**
	 * 终端名称
	 */
	private String clientName = "application";
	private String accessTokenHeader = "access-token";
	/**
	 * 启用oss token兼容
	 */
	private boolean enableOssCompatible = true;
	public PlatformRequestConfig() {
		configuration = Forest.config();
		// 连接池最大连接数
		configuration.setMaxConnections(1000);
		// 连接超时时间，单位为毫秒
		configuration.setConnectTimeout(2000);
		// 数据读取超时时间，单位为毫秒
		configuration.setReadTimeout(2000);
	}
}
